package com.qtenv.datasync.service.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * <p>
 * 历史数据（大表）
 * </p>
 *
 * @author CBL
 * @since 2022-06-22
 */
@Data
@TableName("t_terminal_history_data")
@ApiModel(value = "TTerminalHistoryData对象", description = "历史数据（大表）")
public class TerminalHistoryData implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("自增主键")
    @TableId(value = "ID", type = IdType.AUTO)
    private Long ID;

    @ApiModelProperty("厂家编号")
    @TableField("SupplierID")
    private Integer SupplierID;

    @ApiModelProperty("设备主键")
    @TableField("TerminalID")
    private String TerminalID;

    @ApiModelProperty("设备归属租户")
    @TableField("tenant_id")
    private String tenant_id;

    @ApiModelProperty("总流量(m³)")
    @TableField("TotalFlow")
    private BigDecimal TotalFlow;

    @ApiModelProperty("正向流量(m³)")
    @TableField("ReadNumber")
    private BigDecimal ReadNumber;

    @ApiModelProperty("反向流量(m³)")
    @TableField("ReverseNumber")
    private BigDecimal ReverseNumber;

    @ApiModelProperty("瞬时流量(m³)")
    @TableField("InstantNumber")
    private BigDecimal InstantNumber;

    @ApiModelProperty("瞬时流速")
    @TableField("InstantVelocity")
    private BigDecimal InstantVelocity;

    @ApiModelProperty("管网压力Mpa")
    @TableField("Pressure")
    private BigDecimal Pressure;

    @ApiModelProperty("终端电压V")
    @TableField("TerminalVol")
    private BigDecimal TerminalVol;

    @ApiModelProperty("终端信号强度")
    @TableField("TerminalCSQ")
    private Integer TerminalCSQ;

    @ApiModelProperty("信号描述")
    @TableField("TerminalCSQDescribe")
    private String TerminalCSQDescribe;

    @ApiModelProperty("阀门状态0-状态不明、1-半阀状态、2-关阀状态、3-开阀状态")
    @TableField("ValveState")
    private Integer ValveState;

    @ApiModelProperty("创建时间")
    @TableField("CreateDate")
    private Date CreateDate;

    @ApiModelProperty("抄表时间")
    @TableField("ReadDate")
    @JsonFormat( pattern ="yyyy-MM-dd HH:mm:ss",timezone ="GMT+8")
    private Date ReadDate;

    @ApiModelProperty("实际抄表时间")
    @TableField("ReadDate_s")
    @JsonFormat( pattern ="yyyy-MM-dd HH:mm:ss",timezone ="GMT+8")
    private Date ReadDate_s;

    @ApiModelProperty("报警状态(0-无报警 1-有报警)默认为0")
    @TableField("WarnFlag")
    private Integer WarnFlag;

    @ApiModelProperty("警告")
    @TableField("Warning")
    private String Warning;

    @ApiModelProperty("数据获取的类型(1:自动获取)")
    @TableField("type")
    private Integer type;

    @TableField(exist = false)
    private String TerminalName;
}
